home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
PC
/
MISCBAS
/
FORMAT.ASC
< prev
next >
Wrap
Text File
|
1987-01-11
|
2KB
|
62 lines
10 PRINT"PRINT FORMAT PROGRAM" : PRINT
20 CLEAR 6000
30 INPUT "HOW MANY LINES WILL YOU TYPE";N
40 PRINT "IF YOU FINISH BEFORE TYPING";N;"LINES, TYPE '---'"
41 PRINT
50 INPUT "MAXIMUM LENGTH OF LINES TO BE TYPED";LL
51 PRINT
60 PRINT "IF YOUR LINE IS SHORT AND NEAR END OF PARAGRAPH,"
70 PRINT "TYPE FILL SPACES TO END OF LINE"
71 PRINT
72 PRINT "NOTE !!! YOU MAY NOT USE ANY COMMAS AT ALL..."
73 PRINT "TO DO SO WILL DESTROY REST OF LINE." : PRINT
80 L=LL+2
90 DIM A$(N)
100 PRINT "YOUR ALLOWABLE LINE LENGTH IS AS FOLLOWS:"
110 GOSUB 360
120 PRINT "DO NOT EXCEED THIS LENGTH !" : PRINT
130 FOR I=1 TO N : INPUT A$(I) : X=X+1 : Q=Q+1
140 IF A$(I)="---" THEN I=N : N=X-1 : GOTO 370
150 A$(I)=A$(I)+CHR$(32)
160 IF Q=5 THEN GOSUB 360 : Q=0
170 NEXT I : GOTO 370
180 PRINT : PRINT
190 PRINT "PRESS SPACE BAR FOR FORMATTED COPY" : WAIT 0,1,255
200 PRINT : PRINT
210 FOR J=1 TO N : K=0 : A=LEN(A$(J))
220 IF A<LL/1.3 THEN PRINT A$(J) : GOTO 300
230 B=(LL+1)-A
240 FOR I=1 TO A
250 T=T+1
260 IF T+K=LL+1 THEN T=0 : GOTO 300
270 IF MID$(A$(J),I,1)=" " AND K<B THEN PRINT " "; : K=K+1
280 PRINT MID$(A$(J),I,1);
290 NEXT I
300 PRINT
310 NEXT J
320 PRINT : PRINT : PRINT
330 INPUT "WANT TO DO IT AGAIN";Z$
340 IF LEFT$(Z$,1)="Y" THEN 190
350 END
360 PRINT TAB(L)"<---" : RETURN
370 PRINT :PRINT : PRINT
380 FOR I=1 TO N
390 PRINT A$(I)
400 NEXT I
410 PRINT : PRINT : PRINT
420 INPUT "IS THERE ANY LINE(S) YOU WANT TO CHANGE";Z$
430 IF LEFT$(Z$,1)="Y" THEN 440 ELSE 180
440 PRINT "WHEN ENTERING NEW LINE, ENCLOSE IN QUOTES AND ADD SPACE AT END"
450 INPUT "WHICH LINE"; I
460 PRINT : PRINT A$(I)
470 INPUT "CORRECT LINE"; Z$
480 IF LEFT$(Z$,1)="Y" THEN 490 ELSE 450
490 PRINT "ENTER NEW LINE" : PRINT
500 INPUT A$(I)
510 INPUT "ANY MORE LINES TO BE CHANGED"; Z$
520 IF LEFT$(Z$,1)="Y" THEN 450 ELSE 180
530 END
NE" : PRINT
500 INPUT A$(I)
510 INPUT "ANY MORE LINES TO